<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>DNW-Platform</title>
    <% if(context.env === 'production') { %>
        <% if(context.route.path === '/login' || context.route.path === '/prelogin') { %>
            <script type="text/javascript" src="login/loginN4.js"></script>
            <script type="text/javascript" src="login/digestLoginN4.js"></script>
            <script type="text/javascript" src="login/core/auth.min.js"></script>
        <% } else { %>
            <script type="text/javascript" src="file:^html/static/es6-promise.auto.min.js"></script>
            <script type="text/javascript" src="file:^html/static/baja.js"></script>
<!--            <script type="text/javascript" src="file:^html/static/hikvision/codebase/webVideoCtrl.js"></script>-->
            <script>
              window.toIndex = function toIndex() {
                const url = location.href;
                const index = url.indexOf("index.html");
                const suffix = url.substring(index+10, url.length);
                if(index!==-1 && suffix !=='#/' && suffix !== '') {
                  location.href = "/";
                }
              }
              toIndex();
              window.bajaPromise = new Promise(function(resolve) {
                require(['baja!'], function(baja) {
                  "use strict";
                  resolve(baja);
                })
              });
            </script>
            <base url="/"/>
        <% } %>
    <% } %>
</head>
<body>
<div id="root" style="overflow: hidden"></div>
</body>
</html>
